package com.yetianhua.sqlsession;

import com.yetianhua.pojo.Configuration;

import java.io.InputStream;

/**
 * @author yetianhua
 * @className DefaultSqlSessionFactory
 * @description TODO
 * @date 2021/5/30
 * @time 11:24
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }

    public Configuration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(Configuration configuration) {
        this.configuration = configuration;
    }
}
